<template>
  <div>
    <div class="container">
      <!-- title -->
      <div class="title">
        <b>轮播图管理</b>
      </div>
      <!-- 操作按钮 -->
      <div class="btn_control">
        <el-row >
          <el-col :span="22"><div class="grid-content"></div></el-col>
          <el-col :span="2">
            <el-button type="primary" size="mini" style="margin-left:10px"
              ><i class="el-icon-plus"></i>添加</el-button
            >

          </el-col> 
        </el-row>
      </div>
      <!-- 表单 -->
      <div class="table_box">
            <el-row>
                <el-col :span="24">
                    <el-table
                    :data="tableData"
                    border
                    style="width: 100%"
                    :header-cell-style="{
                    textAlign: 'center',
                    }"
                    :cell-style="{ textAlign: 'center' }"
                    stripe
                >
                <el-table-column prop="img" label="图片">
                    <template slot-scope="scope">
                        <el-image
                        :src="scope.row.img"
                        style="width:100px;height:100px"
                        fit="cover"
                        ></el-image>
                    </template>
                </el-table-column>
                <el-table-column prop="name" label="轮播图位置"></el-table-column>
                <el-table-column prop="title" label="跳转商品编号/对接模块"></el-table-column>
                <el-table-column label="操作">
                    <template slot-scope="scope">
                        <el-button type="text" >编辑</el-button>
                        <span style=" color: #ededed;">|</span>
                        <el-button type="text" class="del">删除</el-button>
                    </template>
                </el-table-column>
                
                 </el-table>
             </el-col>
            </el-row>
      </div>
      <!-- 导航 -->
      <div class="nav">
         <el-pagination
          @size-change="handleSizeChange"
          @current-change="handleCurrentChange"
          :current-page="4"
          :page-sizes="[100, 200, 300, 400]"
          :page-size="100"
          layout="total, sizes, prev, pager, next, jumper"
          :total="400">
        </el-pagination>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      //
      options: [
        { value: "已发布", label: "已发布" },
        { value: "已下架", label: "已下架" },
      ],
      value: "",
      //
      tableData: [
        {
          img: "https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg",
          name: "01",
         title: "wz1314521314",
          tap: "已发布",
          activity: "活动商品",
          price: "888",
        },
      ],
      file: "",
      text1:'',
      text2:'',
      start:'',
      end:''
    };
  },
  methods:{
    handleSizeChange(val) {
        console.log(`每页 ${val} 条`);
      },
      handleCurrentChange(val) {
        console.log(`当前页: ${val}`);
      }
  }
};
</script>

<style>
.container {
  background: #fff;
  width: 90%;
  height: 580px;
  border-top: 2px solid #ededed;
  padding: 20px 40px;
  margin: 0 auto;
}
.title {
  margin-bottom: 40px;
  font-size: 20px;
}
.grid-content {
  border-radius: 4px;
  min-height: 36px;
  background: #d3dce6;
}
.condition_box .el-input {
  width: 220px;
}
.condition_box span {
  font-size: 14px;
}
.btn_control {
  margin-top: 20px;
}
.btn_control i {
  padding: 0 5px;
}
.del {
  color: red;
}
.el-table span{
    margin: 0 10px;
   
}
/* table */
.btn_control .el-button{
    margin-right: 15px;
}
/* 清除el-input-type：number图标样式 */
.num_text input::-webkit-outer-spin-button,
.num_text input::-webkit-inner-spin-button {
    -webkit-appearance: none;
}
.num_text input[type="number"] {
    -moz-appearance: textfield;
}
/* table_box */
.table_box{
    margin-top: 30px;
}
.nav{
  float: right;
  margin-top: 20px;
}
</style>
